88157025830de105f092aed6e70c4000b229e5e1,maven-install-plugin/src/test/java/org/apache/maven/plugin/install/InstallMojoTest.java,InstallMojoTest,testBasicInstallAndCreateChecksumIsTrue,#,255

Before Change


        File pomSha1 = new File( localPath + ".pom.sha1" );

        File md5 = new File( localPath + "." + packaging + ".md5" );
        File sha1 = new File( localPath + "." + packaging + ".sha1" );

        assertTrue( pomMd5.exists() );
        assertTrue( pomSha1.exists() );
        assertTrue( md5.exists() );
        assertTrue( sha1.exists() );

        String generatedMd5 = FileUtils.fileRead( md5, "UTF-8" );
        String generatedSha1 = FileUtils.fileRead( sha1, "UTF-8" );
        String generatedPomMd5 = FileUtils.fileRead( pomMd5, "UTF-8" );
        String generatedPomSha1 = FileUtils.fileRead( pomSha1, "UTF-8" );

        assertEquals( actualMd5Sum, generatedMd5 );

After Change


                        artifact.getVersion() + "/" + artifact.getArtifactId() + "-" + artifact.getVersion();
        
        //get the actual checksum of the pom
        Map<String, Object> csums = ChecksumUtils.calc( pom, Utils.CHECKSUM_ALGORITHMS );
        for (Map.Entry<String, Object> csum : csums.entrySet()) {
            Object actualPomSum = csum.getValue();
            File pomSum = new File( localPath + ".pom." + csum.getKey().toLowerCase().replace( "-", "" ) );
            assertTrue( pomSum.exists() );
            String generatedPomSum = FileUtils.fileRead( pomSum, "UTF-8" );
            assertEquals( actualPomSum, generatedPomSum );
        }

        //get the actual checksum of the artifact